package br.com.colegio.dao.storage;

import java.util.Collection;
import java.util.Map;
import java.util.TreeMap;

import br.com.colegio.dao.FinanceiroContaDAO;

public class FinanceiroContaData {/*
	private static FinanceiroContaData instance;
	private Map<Long,FinanceiroConta> data = new TreeMap<Long,FinanceiroConta>(); 

	private FinanceiroContaData(){}

	public static FinanceiroContaData getInstance(){
		if(instance == null)
			instance = new FinanceiroContaData();

		return instance;
	}

	private Map<Long,FinanceiroConta> getData(){
		if(data.size() == 0){
			Collection<Object> r = FinanceiroContaDAO.list();
			if(r != null)
				for(Object o : r){
					FinanceiroConta a = (FinanceiroConta)o;
					data.put(a.getKey().getId(), a);
				}
		}
		return data;
	}

	public FinanceiroConta getConta(Long id){
		return getData().get(id);
	}

	public Collection<FinanceiroConta> getContas(){
		return getData().values();
	}*/
}